<?php
/*
Plugin Name: Schneidereit Options
Plugin URI: http://custard.co.uk
Description: Schneidereit Options Panel
Version: 1.0
Author: Custard
Author URI: http://custard.co.uk
*/



  //include the main class file
  require_once("admin-page-class/admin-page-class.php");
  
  
  /**
   * configure your admin page
   */
  $config = array(    
		'menu'=> 'settings',             //sub page to settings page
		'page_title' => __('Schneidereit Options','apc'),       //The name of this page 
		'capability' => 'edit_themes',         // The capability needed to view the page 
		'option_group' => 'demo_options',       //the name of the option to create in the database
		'id' => 'admin_page',            // meta box id, unique per page
		'fields' => array(),            // list of fields (can be added by field arrays)
		'local_images' => false,          // Use local or hosted images (meta box images for add/remove)
		'use_with_theme' => false          //change path if used with theme set to true, false for a plugin or anything else for a custom path(default false).
  );  
  
  /**
   * Initiate your admin page
   */
  $options_panel = new BF_Admin_Page_Class($config);
  $options_panel->OpenTabs_container('');
  
  /**
   * define your admin page tabs listing
   */
  $options_panel->TabsListing(array(
    'links' => array(
    'options_1' =>  __('Options','apc'),
    )
  ));
  
  /**
   * Open admin page first tab
   */
  $options_panel->OpenTab('options_1');

  /**
   * Add fields to your admin page first tab
   * 
   * Simple options:
   * input text, checbox, select, radio 
   * textarea
   */
  //title
  $options_panel->Title(__("Options","apc"));
  //Image field
  $options_panel->addImage('homepage_image_large',array('name'=> __('','apc'), 'preview_height' => '350px', 'preview_width' => '687px', 'class' => 'admin_homepage_image_large', 'text_class' => 'admin_homepage_image_large_text' ));

  //Image field
  $options_panel->addImage('homepage_image_small_top',array('name'=> __('','apc'),'preview_height' => '171px', 'preview_width' => '250px', 'class' => 'admin_homepage_image_small_top', 'text_class' => 'admin_homepage_image_small_text' ));

  //Image field
  $options_panel->addImage('homepage_image_small_bottom',array('name'=> __('','apc'),'preview_height' => '171px', 'preview_width' => '250px', 'class' => 'admin_homepage_image_small_bottom', 'text_class' => 'admin_homepage_image_small_text' ));
  
  //text field
  $options_panel->addText('calculator_text',array('name'=> __('<br/><br/>Cost Calculator Text ','apc'), 'std'=> '', 'class' => 'calculator_textarea'));

    //text field
  $options_panel->addText('header_email_address',array('name'=> __('<br/><br/>Email Address ','apc'), 'std'=> '', 'class' => 'small_textarea'));

    //text field
  $options_panel->addText('header_phone_number',array('name'=> __('<br/><br/>Phone Number ','apc'), 'std'=> '', 'class' => 'small_textarea'));
  /**
   * Close first tab
   */   
  $options_panel->CloseTab();


  /**
   * Close 7th tab
   */

  //Now Just for the fun I'll add Help tabs
  $options_panel->HelpTab(array(
    'id'=>'tab_id',
    'title'=> __('My help tab title','apc'),
    'content'=>'<p>'.__('This is my Help Tab content','apc').'</p>'
  ));
  $options_panel->HelpTab(array(
    'id' => 'tab_id2',
    'title' => __('My 2nd help tab title','apc'),
    'callback' => 'help_tab_callback_demo'
  ));
  
  //help tab callback function
  function help_tab_callback_demo(){
    echo '<p>'.__('This is my 2nd Help Tab content from a callback function','apc').'</p>';
  }